﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddEdit.aspx.cs" Inherits="CardLogistics.Web.MainPage.CardRecovery.MakingBadCard.AddEdit" %>

<%@ Register Src="../../../Controls/WebUserControl_Nav.ascx" TagName="WebUserControl_Nav"
    TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>制卡坏卡-编辑</title>
    <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/selPage.css" rel="stylesheet" type="text/css" />
    <script src="../../../js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <script src="../../../js/valReq.js" type="text/javascript"></script>
    <script src="../../../js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../../../js/jquery.tipswindow.2.0.js" type="text/javascript"></script>
    <script type="text/javascript">
        function valReq(issubmit) {
            var altStr = valid_isempty('RECOVERYNO', '单据编号');
            //必须为字母或者数字
            altStr += valid_isnoCh('RECOVERYNO', '单据编号');
            altStr += valid_isempty('RECOVERYDATE', '入库日期');
            altStr += valid_isempty('PutInCardNo', '半成品/成品入库单号');
            if (altStr != "") {
                alert(altStr);
                return false;
            }
            else {
                if (issubmit == 1) {
                    if (confirm("提交后该信息进入待审批状态不可编辑,确认提交吗?") == true) {
                        return true;
                    }
                    else
                        return false;
                }
                else
                    return true;
            }
        }
    </script>
    <script type="text/javascript">
        $(document).ready(function () {    //选择需求单
            $("#PutInCardNo").click(function () {
                $.tipsWindow({
                    ___title: "选择半成品/成品入库单号",
                    ___content: "iframe:../../SelectPage/SelPutInCard.aspx?type=zkhk",
                    ___width: "900",
                    ___height: "500",
                    ___drag: "___boxTitle",
                    ___showbg: true
                });
            });
        })
        
    </script>
    <style type="text/css">
        .delImg
        {
            margin-bottom: -3px;
        }
    </style>
</head>
<body>
    <form id="frmFather" runat="server">
    <uc1:WebUserControl_Nav ID="WebUserControl_Nav1" runat="server" />
    <%=TitleName %>
    <input type="hidden" id="hf_detailId" name="hf_detailId" runat="server" />
    <table class="theForm" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="titleTxtM">
                单据编号：
            </td>
            <td class="contentTxtM">
                <input id="RECOVERYNO" runat="server" type="text" class="dfinputNoEmp"  maxlength="15" />
            </td>
            <td class="titleTxtM">
                入库日期：
            </td>
            <td class="contentTxtM">
                <input id="RECOVERYDATE" runat="server" type="text" class="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
            </td>
            <td class="titleTxtM" style="white-space: nowrap;">
                半成品/成品入库单号：
            </td>
            <td class="contentTxtM">
                <input id="PutInCardNo" runat="server" type="text" class="dfinputImg" readonly="readonly"
                    maxlength="25" />
                <asp:HiddenField ID="hf_PutInCardId" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="titleTxtM">
                备注：
            </td>
            <td colspan="5">
                <input id="REMARKS" runat="server" type="text" class="dfinput" style="width: 93.7%;"
                    maxlength="200" />
            </td>
        </tr>
        <tr>
            <td colspan="6">
                <div class="ddetail" style="height: 270px;">
                    <asp:Repeater ID="rptDetailList" runat="Server">
                        <HeaderTemplate>
                            <table class="tabledetail" id="tbDetailList">
                                <thead>
                                    <tr>
                                        <th style="width: 80px;">
                                            序号
                                        </th>
                                        <th width="242px">
                                            开始卡号
                                        </th>
                                        <th width="242px">
                                            结束卡号
                                        </th>
                                        <th width="100px">
                                            数量
                                        </th>
                                        <th>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td align="center">
                                    <%# Container.ItemIndex+1+(WebPageIndex*WebPageSize-10) %>
                                </td>
                                <td align="center">
                                    <asp:Label Text='<%# Eval("STARTCARDNO") %>' ID="lbl_STARTCARDNO" runat="server"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label Text='<%#Eval("ENDCARDNO") %>' ID="lbl_ENDCARDNO" runat="server"></asp:Label>
                                </td>
                                <td align="center">
                                    <asp:Label Text='<%#Eval("CARDAMOUNT") %>' ID="lbl_CARDAMOUNT" runat="server"></asp:Label>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </tbody></table>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
            </td>
        </tr>
        <tr class="btntr">
            <td colspan="6" align="center">
                <asp:Button ID="btn_Submit" CssClass="btn" runat="server" Text="保存并提交" OnClientClick="return valReq(1);"
                    OnClick="btn_Submit_Click" />
                <asp:Button ID="btn_Add" CssClass="btn" runat="server" Text="保存" OnClientClick="return valReq(0);"
                    OnClick="btn_Add_Click" />
                <input type="button" class="btn" value="返回" onclick="javascript:history.go(-1);" />
            </td>
        </tr>
    </table>
    <div id="d_btn" visible="false" style="display: none;">
        <asp:Button ID="btn_PutInCardNo" runat="server" Text="bt n" OnClick="btn_PutInCardNo_Click" />
    </div>
    </form>
</body>
</html>
